﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

using XCode;
using BingZi.HY.Core;

namespace BingZi.HY.Core
{
	/// <summary>
	/// 角色应用表
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("角色应用表")]
	[BindTable("sys_RoleApplication", Description = "角色应用表", ConnName = "System")]
	public partial class sys_RoleApplication
	{
		#region 属性

        private Int32 _A_ID;
        /// <summary>
        /// 编号
        /// </summary>
        [Description("编号")]
        [DataObjectField(true, true, false, 10)]
        [BindColumn(1, "A_ID", "编号", "", "int", 10, 0, false)]
        public Int32 A_ID
        {
            get { return _A_ID; }
            set { if (OnPropertyChanging("A_ID", value)) _A_ID = value; }
        }



		private Int32 _A_RoleID;
		/// <summary>
		/// 角色ID与sys_Roles中RoleID相关
		/// </summary>
		[Description("角色ID与sys_Roles中RoleID相关")]
        [DataObjectField(false, false, false, 10)]
		[BindColumn(2, "A_RoleID", "角色ID与sys_Roles中RoleID相关", "", "int", 10, 0, false)]
		public Int32 A_RoleID
		{
			get { return _A_RoleID; }
			set { if (OnPropertyChanging("A_RoleID", value)) { _A_RoleID = value;   } }
		}

		private Int32 _A_ApplicationID;
		/// <summary>
		/// 应用ID与sys_Applications中Appl
		/// </summary>
		[Description("应用ID与sys_Applications中Appl")]
        [DataObjectField(false, false, false, 10)]
		[BindColumn(3, "A_ApplicationID", "应用ID与sys_Applications中Appl", "", "int", 10, 0, false)]
		public Int32 A_ApplicationID
		{
			get { return _A_ApplicationID; }
			set { if (OnPropertyChanging("A_ApplicationID", value)) { _A_ApplicationID = value;   } }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
                    case "A_ID": return _A_ID;
					case "A_RoleID" : return _A_RoleID;
					case "A_ApplicationID" : return _A_ApplicationID;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
                    case "A_ID": _A_ID = Convert.ToInt32(value); break;
					case "A_RoleID" : _A_RoleID = Convert.ToInt32(value); break;
					case "A_ApplicationID" : _A_ApplicationID = Convert.ToInt32(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得角色应用表字段名的快捷方式
		/// </summary>
        [CLSCompliant(false)]
		public class _
		{
            ///<summary>
            /// 序号
            ///</summary>
            public const String A_ID = "A_ID";

			///<summary>
			/// 角色ID与sys_Roles中RoleID相关
			///</summary>
			public const String A_RoleID = "A_RoleID";

			///<summary>
			/// 应用ID与sys_Applications中Appl
			///</summary>
			public const String A_ApplicationID = "A_ApplicationID";
		}
		#endregion
	}
}